package com.zanfeng.signleplatform.config.advices;

import com.zanfeng.signleplatform.api.exception.UnAuthorizedException;
import com.zanfeng.signleplatform.common.auth.ApiTokenResult;
import com.zanfeng.signleplatform.auth.WtAuthorization;
import com.zanfeng.signleplatform.config.utils.ApplicationContextUtil;
import com.zanfeng.signleplatform.constants.Constants;
import com.zanfeng.signleplatform.modules.token.TokenHelper;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;

@Configuration
public class ModulesAuthorizationInterceptor extends BaseAuthorizationInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        this.handleModulePreHandle(request, response, handler);
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {

    }

    @Override
    public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {

    }
}
